package com.yuyu.commons.caffeine;

import com.github.benmanes.caffeine.cache.Cache;

/**
 * @author
 * @description: 返回接口
 * @date: 2022/9/13 16:22
 */
public interface ICallBack<Q,T> {

     //查db
     T getFromDB(Q key,Long expireTime);

     //查询redis
     T getFromRedis(Q key);

     //从本地caffeine查询
     T getFromCache(Cache<Q,T> cache,Q key);

}
